package com.example.hjt_java_web_homework3.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Li Chun Hei
 * @date 31/10/2025
 * @description
 */
public class EnvironmentData {
    private Long id;
    private BigDecimal temperature;
    private BigDecimal humidity;
    private BigDecimal energyConsumption;
    private String location;
    private Date recordedAt;

    public EnvironmentData() {}

    public EnvironmentData(BigDecimal temperature, BigDecimal humidity,
                           BigDecimal energyConsumption, String location) {
        this.temperature = temperature;
        this.humidity = humidity;
        this.energyConsumption = energyConsumption;
        this.location = location;
        this.recordedAt = new Date();
    }

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public BigDecimal getTemperature() { return temperature; }
    public void setTemperature(BigDecimal temperature) { this.temperature = temperature; }
    public BigDecimal getHumidity() { return humidity; }
    public void setHumidity(BigDecimal humidity) { this.humidity = humidity; }
    public BigDecimal getEnergyConsumption() { return energyConsumption; }
    public void setEnergyConsumption(BigDecimal energyConsumption) { this.energyConsumption = energyConsumption; }
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    public Date getRecordedAt() { return recordedAt; }
    public void setRecordedAt(Date recordedAt) { this.recordedAt = recordedAt; }
}
